home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / wincon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  14.4 KB  |  742 lines

  1. /*++ BUILD Version: 0002    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1989-1996  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     wincon.h
  8.  
  9. Abstract:
  10.  
  11.     This module contains the public data structures, data types,
  12.     and procedures exported by the NT console subsystem.
  13.  
  14. Created:
  15.  
  16.     26-Oct-1990
  17.  
  18. Revision History:
  19.  
  20. --*/
  21.  
  22. #ifndef _WINCON_
  23. #define _WINCON_
  24. #pragma option push -b
  25.  
  26.  
  27. #ifdef __BORLANDC__
  28.  
  29.   #include <pshpack4.h>
  30.  
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. typedef struct _COORD {
  38.     SHORT X;
  39.     SHORT Y;
  40. } COORD, *PCOORD;
  41.  
  42. typedef struct _SMALL_RECT {
  43.     SHORT Left;
  44.     SHORT Top;
  45.     SHORT Right;
  46.     SHORT Bottom;
  47. } SMALL_RECT, *PSMALL_RECT;
  48.  
  49. typedef struct _KEY_EVENT_RECORD {
  50.     BOOL bKeyDown;
  51.     WORD wRepeatCount;
  52.     WORD wVirtualKeyCode;
  53.     WORD wVirtualScanCode;
  54.     union {
  55.         WCHAR UnicodeChar;
  56.         CHAR   AsciiChar;
  57.     } uChar;
  58.     DWORD dwControlKeyState;
  59. } KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
  60.  
  61. //
  62. // ControlKeyState flags
  63. //
  64.  
  65. #define RIGHT_ALT_PRESSED     0x0001 // the right alt key is pressed.
  66. #define LEFT_ALT_PRESSED      0x0002 // the left alt key is pressed.
  67. #define RIGHT_CTRL_PRESSED    0x0004 // the right ctrl key is pressed.
  68. #define LEFT_CTRL_PRESSED     0x0008 // the left ctrl key is pressed.
  69. #define SHIFT_PRESSED         0x0010 // the shift key is pressed.
  70. #define NUMLOCK_ON            0x0020 // the numlock light is on.
  71. #define SCROLLLOCK_ON         0x0040 // the scrolllock light is on.
  72. #define CAPSLOCK_ON           0x0080 // the capslock light is on.
  73. #define ENHANCED_KEY          0x0100 // the key is enhanced.
  74.  
  75. typedef struct _MOUSE_EVENT_RECORD {
  76.     COORD dwMousePosition;
  77.     DWORD dwButtonState;
  78.     DWORD dwControlKeyState;
  79.     DWORD dwEventFlags;
  80. } MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
  81.  
  82. //
  83. // ButtonState flags
  84. //
  85.  
  86. #define FROM_LEFT_1ST_BUTTON_PRESSED    0x0001
  87. #define RIGHTMOST_BUTTON_PRESSED        0x0002
  88. #define FROM_LEFT_2ND_BUTTON_PRESSED    0x0004
  89. #define FROM_LEFT_3RD_BUTTON_PRESSED    0x0008
  90. #define FROM_LEFT_4TH_BUTTON_PRESSED    0x0010
  91.  
  92. //
  93. // EventFlags
  94. //
  95.  
  96. #define MOUSE_MOVED   0x0001
  97. #define DOUBLE_CLICK  0x0002
  98.  
  99. typedef struct _WINDOW_BUFFER_SIZE_RECORD {
  100.     COORD dwSize;
  101. } WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
  102.  
  103. typedef struct _MENU_EVENT_RECORD {
  104.     UINT dwCommandId;
  105. } MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
  106.  
  107. typedef struct _FOCUS_EVENT_RECORD {
  108.     BOOL bSetFocus;
  109. } FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
  110.  
  111. typedef struct _INPUT_RECORD {
  112.     WORD EventType;
  113.     union {
  114.         KEY_EVENT_RECORD KeyEvent;
  115.         MOUSE_EVENT_RECORD MouseEvent;
  116.         WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
  117.         MENU_EVENT_RECORD MenuEvent;
  118.         FOCUS_EVENT_RECORD FocusEvent;
  119.     } Event;
  120. } INPUT_RECORD, *PINPUT_RECORD;
  121.  
  122. //
  123. //  EventType flags:
  124. //
  125.  
  126. #define KEY_EVENT         0x0001 // Event contains key event record
  127. #define MOUSE_EVENT       0x0002 // Event contains mouse event record
  128. #define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event record
  129. #define MENU_EVENT 0x0008 // Event contains menu event record
  130. #define FOCUS_EVENT 0x0010 // event contains focus change
  131.  
  132. typedef struct _CHAR_INFO {
  133.     union {
  134.         WCHAR UnicodeChar;
  135.         CHAR   AsciiChar;
  136.     } Char;
  137.     WORD Attributes;
  138. } CHAR_INFO, *PCHAR_INFO;
  139.  
  140. //
  141. // Attributes flags:
  142. //
  143.  
  144. #define FOREGROUND_BLUE      0x0001 // text color contains blue.
  145. #define FOREGROUND_GREEN     0x0002 // text color contains green.
  146. #define FOREGROUND_RED       0x0004 // text color contains red.
  147. #define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
  148. #define BACKGROUND_BLUE      0x0010 // background color contains blue.
  149. #define BACKGROUND_GREEN     0x0020 // background color contains green.
  150. #define BACKGROUND_RED       0x0040 // background color contains red.
  151. #define BACKGROUND_INTENSITY 0x0080 // background color is intensified.
  152.  
  153.  
  154. typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
  155.     COORD dwSize;
  156.     COORD dwCursorPosition;
  157.     WORD  wAttributes;
  158.     SMALL_RECT srWindow;
  159.     COORD dwMaximumWindowSize;
  160. } CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
  161.  
  162. typedef struct _CONSOLE_CURSOR_INFO {
  163.     DWORD  dwSize;
  164.     BOOL   bVisible;
  165. } CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
  166.  
  167. //
  168. // typedef for ctrl-c handler routines
  169. //
  170.  
  171. typedef
  172. BOOL
  173. (WINAPI *PHANDLER_ROUTINE)(
  174.     DWORD CtrlType
  175.     );
  176.  
  177. #define CTRL_C_EVENT        0
  178. #define CTRL_BREAK_EVENT    1
  179. #define CTRL_CLOSE_EVENT    2
  180. // 3 is reserved!
  181. // 4 is reserved!
  182. #define CTRL_LOGOFF_EVENT   5
  183. #define CTRL_SHUTDOWN_EVENT 6
  184.  
  185. //
  186. //  Input Mode flags:
  187. //
  188.  
  189. #define ENABLE_PROCESSED_INPUT 0x0001
  190. #define ENABLE_LINE_INPUT      0x0002
  191. #define ENABLE_ECHO_INPUT      0x0004
  192. #define ENABLE_WINDOW_INPUT    0x0008
  193. #define ENABLE_MOUSE_INPUT     0x0010
  194.  
  195. //
  196. // Output Mode flags:
  197. //
  198.  
  199. #define ENABLE_PROCESSED_OUTPUT    0x0001
  200. #define ENABLE_WRAP_AT_EOL_OUTPUT  0x0002
  201.  
  202. //
  203. // direct API definitions.
  204. //
  205.  
  206. WINBASEAPI
  207. BOOL
  208. WINAPI
  209. PeekConsoleInputA(
  210.     HANDLE hConsoleInput,
  211.     PINPUT_RECORD lpBuffer,
  212.     DWORD nLength,
  213.     LPDWORD lpNumberOfEventsRead
  214.     );
  215. WINBASEAPI
  216. BOOL
  217. WINAPI
  218. PeekConsoleInputW(
  219.     HANDLE hConsoleInput,
  220.     PINPUT_RECORD lpBuffer,
  221.     DWORD nLength,
  222.     LPDWORD lpNumberOfEventsRead
  223.     );
  224. #ifdef UNICODE
  225. #define PeekConsoleInput  PeekConsoleInputW
  226. #else
  227. #define PeekConsoleInput  PeekConsoleInputA
  228. #endif // !UNICODE
  229.  
  230. WINBASEAPI
  231. BOOL
  232. WINAPI
  233. ReadConsoleInputA(
  234.     HANDLE hConsoleInput,
  235.     PINPUT_RECORD lpBuffer,
  236.     DWORD nLength,
  237.     LPDWORD lpNumberOfEventsRead
  238.     );
  239. WINBASEAPI
  240. BOOL
  241. WINAPI
  242. ReadConsoleInputW(
  243.     HANDLE hConsoleInput,
  244.     PINPUT_RECORD lpBuffer,
  245.     DWORD nLength,
  246.     LPDWORD lpNumberOfEventsRead
  247.     );
  248. #ifdef UNICODE
  249. #define ReadConsoleInput  ReadConsoleInputW
  250. #else
  251. #define ReadConsoleInput  ReadConsoleInputA
  252. #endif // !UNICODE
  253.  
  254. WINBASEAPI
  255. BOOL
  256. WINAPI
  257. WriteConsoleInputA(
  258.     HANDLE hConsoleInput,
  259.     CONST INPUT_RECORD *lpBuffer,
  260.     DWORD nLength,
  261.     LPDWORD lpNumberOfEventsWritten
  262.     );
  263. WINBASEAPI
  264. BOOL
  265. WINAPI
  266. WriteConsoleInputW(
  267.     HANDLE hConsoleInput,
  268.     CONST INPUT_RECORD *lpBuffer,
  269.     DWORD nLength,
  270.     LPDWORD lpNumberOfEventsWritten
  271.     );
  272. #ifdef UNICODE
  273. #define WriteConsoleInput  WriteConsoleInputW
  274. #else
  275. #define WriteConsoleInput  WriteConsoleInputA
  276. #endif // !UNICODE
  277.  
  278. WINBASEAPI
  279. BOOL
  280. WINAPI
  281. ReadConsoleOutputA(
  282.     HANDLE hConsoleOutput,
  283.     PCHAR_INFO lpBuffer,
  284.     COORD dwBufferSize,
  285.     COORD dwBufferCoord,
  286.     PSMALL_RECT lpReadRegion
  287.     );
  288. WINBASEAPI
  289. BOOL
  290. WINAPI
  291. ReadConsoleOutputW(
  292.     HANDLE hConsoleOutput,
  293.     PCHAR_INFO lpBuffer,
  294.     COORD dwBufferSize,
  295.     COORD dwBufferCoord,
  296.     PSMALL_RECT lpReadRegion
  297.     );
  298. #ifdef UNICODE
  299. #define ReadConsoleOutput  ReadConsoleOutputW
  300. #else
  301. #define ReadConsoleOutput  ReadConsoleOutputA
  302. #endif // !UNICODE
  303.  
  304. WINBASEAPI
  305. BOOL
  306. WINAPI
  307. WriteConsoleOutputA(
  308.     HANDLE hConsoleOutput,
  309.     CONST CHAR_INFO *lpBuffer,
  310.     COORD dwBufferSize,
  311.     COORD dwBufferCoord,
  312.     PSMALL_RECT lpWriteRegion
  313.     );
  314. WINBASEAPI
  315. BOOL
  316. WINAPI
  317. WriteConsoleOutputW(
  318.     HANDLE hConsoleOutput,
  319.     CONST CHAR_INFO *lpBuffer,
  320.     COORD dwBufferSize,
  321.     COORD dwBufferCoord,
  322.     PSMALL_RECT lpWriteRegion
  323.     );
  324. #ifdef UNICODE
  325. #define WriteConsoleOutput  WriteConsoleOutputW
  326. #else
  327. #define WriteConsoleOutput  WriteConsoleOutputA
  328. #endif // !UNICODE
  329.  
  330. WINBASEAPI
  331. BOOL
  332. WINAPI
  333. ReadConsoleOutputCharacterA(
  334.     HANDLE hConsoleOutput,
  335.     LPSTR lpCharacter,
  336.     DWORD nLength,
  337.     COORD dwReadCoord,
  338.     LPDWORD lpNumberOfCharsRead
  339.     );
  340. WINBASEAPI
  341. BOOL
  342. WINAPI
  343. ReadConsoleOutputCharacterW(
  344.     HANDLE hConsoleOutput,
  345.     LPWSTR lpCharacter,
  346.     DWORD nLength,
  347.     COORD dwReadCoord,
  348.     LPDWORD lpNumberOfCharsRead
  349.     );
  350. #ifdef UNICODE
  351. #define ReadConsoleOutputCharacter  ReadConsoleOutputCharacterW
  352. #else
  353. #define ReadConsoleOutputCharacter  ReadConsoleOutputCharacterA
  354. #endif // !UNICODE
  355.  
  356. WINBASEAPI
  357. BOOL
  358. WINAPI
  359. ReadConsoleOutputAttribute(
  360.     HANDLE hConsoleOutput,
  361.     LPWORD lpAttribute,
  362.     DWORD nLength,
  363.     COORD dwReadCoord,
  364.     LPDWORD lpNumberOfAttrsRead
  365.     );
  366.  
  367. WINBASEAPI
  368. BOOL
  369. WINAPI
  370. WriteConsoleOutputCharacterA(
  371.     HANDLE hConsoleOutput,
  372.     LPCSTR lpCharacter,
  373.     DWORD nLength,
  374.     COORD dwWriteCoord,
  375.     LPDWORD lpNumberOfCharsWritten
  376.     );
  377. WINBASEAPI
  378. BOOL
  379. WINAPI
  380. WriteConsoleOutputCharacterW(
  381.     HANDLE hConsoleOutput,
  382.     LPCWSTR lpCharacter,
  383.     DWORD nLength,
  384.     COORD dwWriteCoord,
  385.     LPDWORD lpNumberOfCharsWritten
  386.     );
  387. #ifdef UNICODE
  388. #define WriteConsoleOutputCharacter  WriteConsoleOutputCharacterW
  389. #else
  390. #define WriteConsoleOutputCharacter  WriteConsoleOutputCharacterA
  391. #endif // !UNICODE
  392.  
  393. WINBASEAPI
  394. BOOL
  395. WINAPI
  396. WriteConsoleOutputAttribute(
  397.     HANDLE hConsoleOutput,
  398.     CONST WORD *lpAttribute,
  399.     DWORD nLength,
  400.     COORD dwWriteCoord,
  401.     LPDWORD lpNumberOfAttrsWritten
  402.     );
  403.  
  404. WINBASEAPI
  405. BOOL
  406. WINAPI
  407. FillConsoleOutputCharacterA(
  408.     HANDLE hConsoleOutput,
  409.     CHAR  cCharacter,
  410.     DWORD  nLength,
  411.     COORD  dwWriteCoord,
  412.     LPDWORD lpNumberOfCharsWritten
  413.     );
  414. WINBASEAPI
  415. BOOL
  416. WINAPI
  417. FillConsoleOutputCharacterW(
  418.     HANDLE hConsoleOutput,
  419.     WCHAR  cCharacter,
  420.     DWORD  nLength,
  421.     COORD  dwWriteCoord,
  422.     LPDWORD lpNumberOfCharsWritten
  423.     );
  424. #ifdef UNICODE
  425. #define FillConsoleOutputCharacter  FillConsoleOutputCharacterW
  426. #else
  427. #define FillConsoleOutputCharacter  FillConsoleOutputCharacterA
  428. #endif // !UNICODE
  429.  
  430. WINBASEAPI
  431. BOOL
  432. WINAPI
  433. FillConsoleOutputAttribute(
  434.     HANDLE hConsoleOutput,
  435.     WORD   wAttribute,
  436.     DWORD  nLength,
  437.     COORD  dwWriteCoord,
  438.     LPDWORD lpNumberOfAttrsWritten
  439.     );
  440.  
  441. WINBASEAPI
  442. BOOL
  443. WINAPI
  444. GetConsoleMode(
  445.     HANDLE hConsoleHandle,
  446.     LPDWORD lpMode
  447.     );
  448.  
  449. WINBASEAPI
  450. BOOL
  451. WINAPI
  452. GetNumberOfConsoleInputEvents(
  453.     HANDLE hConsoleInput,
  454.     LPDWORD lpNumberOfEvents
  455.     );
  456.  
  457. WINBASEAPI
  458. BOOL
  459. WINAPI
  460. GetConsoleScreenBufferInfo(
  461.     HANDLE hConsoleOutput,
  462.     PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo
  463.     );
  464.  
  465. WINBASEAPI
  466. COORD
  467. WINAPI
  468. GetLargestConsoleWindowSize(
  469.     HANDLE hConsoleOutput
  470.     );
  471.  
  472. WINBASEAPI
  473. BOOL
  474. WINAPI
  475. GetConsoleCursorInfo(
  476.     HANDLE hConsoleOutput,
  477.     PCONSOLE_CURSOR_INFO lpConsoleCursorInfo
  478.     );
  479.  
  480. WINBASEAPI
  481. BOOL
  482. WINAPI
  483. GetNumberOfConsoleMouseButtons(
  484.     LPDWORD lpNumberOfMouseButtons
  485.     );
  486.  
  487. WINBASEAPI
  488. BOOL
  489. WINAPI
  490. SetConsoleMode(
  491.     HANDLE hConsoleHandle,
  492.     DWORD dwMode
  493.     );
  494.  
  495. WINBASEAPI
  496. BOOL
  497. WINAPI
  498. SetConsoleActiveScreenBuffer(
  499.     HANDLE hConsoleOutput
  500.     );
  501.  
  502. WINBASEAPI
  503. BOOL
  504. WINAPI
  505. FlushConsoleInputBuffer(
  506.     HANDLE hConsoleInput
  507.     );
  508.  
  509. WINBASEAPI
  510. BOOL
  511. WINAPI
  512. SetConsoleScreenBufferSize(
  513.     HANDLE hConsoleOutput,
  514.     COORD dwSize
  515.     );
  516.  
  517. WINBASEAPI
  518. BOOL
  519. WINAPI
  520. SetConsoleCursorPosition(
  521.     HANDLE hConsoleOutput,
  522.     COORD dwCursorPosition
  523.     );
  524.  
  525. WINBASEAPI
  526. BOOL
  527. WINAPI
  528. SetConsoleCursorInfo(
  529.     HANDLE hConsoleOutput,
  530.     CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
  531.     );
  532.  
  533. WINBASEAPI
  534. BOOL
  535. WINAPI
  536. ScrollConsoleScreenBufferA(
  537.     HANDLE hConsoleOutput,
  538.     CONST SMALL_RECT *lpScrollRectangle,
  539.     CONST SMALL_RECT *lpClipRectangle,
  540.     COORD dwDestinationOrigin,
  541.     CONST CHAR_INFO *lpFill
  542.     );
  543. WINBASEAPI
  544. BOOL
  545. WINAPI
  546. ScrollConsoleScreenBufferW(
  547.     HANDLE hConsoleOutput,
  548.     CONST SMALL_RECT *lpScrollRectangle,
  549.     CONST SMALL_RECT *lpClipRectangle,
  550.     COORD dwDestinationOrigin,
  551.     CONST CHAR_INFO *lpFill
  552.     );
  553. #ifdef UNICODE
  554. #define ScrollConsoleScreenBuffer  ScrollConsoleScreenBufferW
  555. #else
  556. #define ScrollConsoleScreenBuffer  ScrollConsoleScreenBufferA
  557. #endif // !UNICODE
  558.  
  559. WINBASEAPI
  560. BOOL
  561. WINAPI
  562. SetConsoleWindowInfo(
  563.     HANDLE hConsoleOutput,
  564.     BOOL bAbsolute,
  565.     CONST SMALL_RECT *lpConsoleWindow
  566.     );
  567.  
  568. WINBASEAPI
  569. BOOL
  570. WINAPI
  571. SetConsoleTextAttribute(
  572.     HANDLE hConsoleOutput,
  573.     WORD wAttributes
  574.     );
  575.  
  576. WINBASEAPI
  577. BOOL
  578. WINAPI
  579. SetConsoleCtrlHandler(
  580.     PHANDLER_ROUTINE HandlerRoutine,
  581.     BOOL Add
  582.     );
  583.  
  584. WINBASEAPI
  585. BOOL
  586. WINAPI
  587. GenerateConsoleCtrlEvent(
  588.     DWORD dwCtrlEvent,
  589.     DWORD dwProcessGroupId
  590.     );
  591.  
  592. WINBASEAPI
  593. BOOL
  594. WINAPI
  595. AllocConsole( VOID );
  596.  
  597. WINBASEAPI
  598. BOOL
  599. WINAPI
  600. FreeConsole( VOID );
  601.  
  602.  
  603. WINBASEAPI
  604. DWORD
  605. WINAPI
  606. GetConsoleTitleA(
  607.     LPSTR lpConsoleTitle,
  608.     DWORD nSize
  609.     );
  610. WINBASEAPI
  611. DWORD
  612. WINAPI
  613. GetConsoleTitleW(
  614.     LPWSTR lpConsoleTitle,
  615.     DWORD nSize
  616.     );
  617. #ifdef UNICODE
  618. #define GetConsoleTitle  GetConsoleTitleW
  619. #else
  620. #define GetConsoleTitle  GetConsoleTitleA
  621. #endif // !UNICODE
  622.  
  623. WINBASEAPI
  624. BOOL
  625. WINAPI
  626. SetConsoleTitleA(
  627.     LPCSTR lpConsoleTitle
  628.     );
  629. WINBASEAPI
  630. BOOL
  631. WINAPI
  632. SetConsoleTitleW(
  633.     LPCWSTR lpConsoleTitle
  634.     );
  635. #ifdef UNICODE
  636. #define SetConsoleTitle  SetConsoleTitleW
  637. #else
  638. #define SetConsoleTitle  SetConsoleTitleA
  639. #endif // !UNICODE
  640.  
  641. WINBASEAPI
  642. BOOL
  643. WINAPI
  644. ReadConsoleA(
  645.     HANDLE hConsoleInput,
  646.     LPVOID lpBuffer,
  647.     DWORD nNumberOfCharsToRead,
  648.     LPDWORD lpNumberOfCharsRead,
  649.     LPVOID lpReserved
  650.     );
  651. WINBASEAPI
  652. BOOL
  653. WINAPI
  654. ReadConsoleW(
  655.     HANDLE hConsoleInput,
  656.     LPVOID lpBuffer,
  657.     DWORD nNumberOfCharsToRead,
  658.     LPDWORD lpNumberOfCharsRead,
  659.     LPVOID lpReserved
  660.     );
  661. #ifdef UNICODE
  662. #define ReadConsole  ReadConsoleW
  663. #else
  664. #define ReadConsole  ReadConsoleA
  665. #endif // !UNICODE
  666.  
  667. WINBASEAPI
  668. BOOL
  669. WINAPI
  670. WriteConsoleA(
  671.     HANDLE hConsoleOutput,
  672.     CONST VOID *lpBuffer,
  673.     DWORD nNumberOfCharsToWrite,
  674.     LPDWORD lpNumberOfCharsWritten,
  675.     LPVOID lpReserved
  676.     );
  677. WINBASEAPI
  678. BOOL
  679. WINAPI
  680. WriteConsoleW(
  681.     HANDLE hConsoleOutput,
  682.     CONST VOID *lpBuffer,
  683.     DWORD nNumberOfCharsToWrite,
  684.     LPDWORD lpNumberOfCharsWritten,
  685.     LPVOID lpReserved
  686.     );
  687. #ifdef UNICODE
  688. #define WriteConsole  WriteConsoleW
  689. #else
  690. #define WriteConsole  WriteConsoleA
  691. #endif // !UNICODE
  692.  
  693. #define CONSOLE_TEXTMODE_BUFFER  1
  694.  
  695. WINBASEAPI
  696. HANDLE
  697. WINAPI
  698. CreateConsoleScreenBuffer(
  699.     DWORD dwDesiredAccess,
  700.     DWORD dwShareMode,
  701.     CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,
  702.     DWORD dwFlags,
  703.     LPVOID lpScreenBufferData
  704.     );
  705.  
  706. WINBASEAPI
  707. UINT
  708. WINAPI
  709. GetConsoleCP( VOID );
  710.  
  711. WINBASEAPI
  712. BOOL
  713. WINAPI
  714. SetConsoleCP(
  715.     UINT wCodePageID
  716.     );
  717.  
  718. WINBASEAPI
  719. UINT
  720. WINAPI
  721. GetConsoleOutputCP( VOID );
  722.  
  723. WINBASEAPI
  724. BOOL
  725. WINAPI
  726. SetConsoleOutputCP(
  727.     UINT wCodePageID
  728.     );
  729.  
  730. #ifdef __cplusplus
  731. }
  732. #endif
  733.  
  734. #ifdef __BORLANDC__
  735.  
  736.   #include <poppack.h>
  737.  
  738. #endif
  739.  
  740. #pragma option pop
  741. #endif // _WINCON_
  742.